home *** CD-ROM | disk | FTP | other *** search
/ Sun Solutions 1997 April to September / Sun Solutions CD - APR '97 - SEP '97 (704-3778-12 Rev. H)(Sun Microsystems, Inc.)(1997).iso / products / Hyperion / src / Makefile.linux < prev    next >
Makefile  |  1997-02-26  |  5KB  |  158 lines

  1. # @(#)Makefile.linux    1.9 4/8/94
  2.  
  3. # Uncomment the following if you're compiling on Solaris 2.  It adds an option
  4. # (-o) and changes the default device name of the CD-ROM.
  5. #SOL2 = -DSYSV
  6.  
  7. # Set these to the locations of your XView include files and libraries.
  8. INCDIR = $(OPENWINHOME)/include
  9. LIBDIR = $(OPENWINHOME)/lib
  10.  
  11. # Location of the X libraries
  12. XLIBDIR = /usr/X386/lib
  13.  
  14. # If your linker supports the -R flag to set a default location for
  15. # shared libraries, uncomment this line.
  16. #LIBLOC = -R$(LIBDIR)
  17.  
  18. # Set these to the directory names in which to install the software and
  19. # help files.
  20. BINDIR = $(OPENWINHOME)/bin
  21. HLPDIR = $(OPENWINHOME)/lib/help
  22.  
  23. # Set this to the directory containing manual pages.  Manual pages will only
  24. # be installed if you "make install.man".
  25. MANDIR = $(OPENWINHOME)/man
  26.  
  27. # Set these to the manual sections (e.g. 1, 4, 5, l) for the program and
  28. # database file manual pages, respectively.
  29. PEXT = 1
  30. DEXT = 5
  31.  
  32. # And don't worry about anything from this line on.
  33.  
  34. ############################################################################
  35. # Parameters.
  36.  
  37. PROGRAM = workman
  38. SOURCES.c = workman_stubs.c database.c cdinfo.c display.c setup.c \
  39.     ui_cdinfo.c plat_sun.c plat_hpux.c plat_linux.c plat_news.c \
  40.     plat_bsd386.c plat_ultrix.c cdrom.c scsi.c drv_toshiba.c drv_sony.c \
  41.     plat_svr4.c plat_freebsd.c plat_osf1.c
  42. SOURCES.h = struct.h workman_ui.h
  43.  
  44. OBJECTS = \
  45.     $(SOURCES.c:%.c=%.o)
  46.  
  47. # Compiler flags.
  48.  
  49. CFLAGS = -g -O6 -m486 -fwritable-strings -Dlinux -DLINUX_SCSI_PASSTHROUGH
  50. CPPFLAGS = -I$(INCDIR) $(SOL2)
  51. LDFLAGS = -L$(LIBDIR) -L$(XLIBDIR) $(LIBLOC)
  52. LDLIBS = -lxview -lolgx -lX11
  53. CC = gcc
  54.  
  55. # Standard targets.
  56.  
  57. all:     $(PROGRAM) $(PROGRAM).doc workmandb.doc
  58.  
  59. $(PROGRAM): $(SOURCES.c) $(OBJECTS)
  60.     $(CC) $(LDFLAGS) -o $@ $(OBJECTS) $(LDLIBS)
  61.  
  62. clean:
  63.     $(RM) $(OBJECTS) *.BAK *.delta core
  64.  
  65. install: $(PROGRAM)
  66.     cp $(PROGRAM) $(BINDIR)
  67.  
  68.     chown root $(BINDIR)/$(PROGRAM)
  69.     chmod 4755 $(BINDIR)/$(PROGRAM)
  70.  
  71.     cp $(PROGRAM).info $(HLPDIR)
  72.     chmod 644 $(HLPDIR)/$(PROGRAM).info
  73.  
  74. install.man: workman.man workmandb.man $(MANDIR)/man$(PEXT) $(MANDIR)/man$(DEXT)
  75.     cp workman.man $(MANDIR)/man$(PEXT)/workman.$(PEXT)
  76.     chmod 644 $(MANDIR)/man$(PEXT)/workman.$(PEXT)
  77.     cp workmandb.man $(MANDIR)/man$(DEXT)/workmandb.$(DEXT)
  78.     chmod 644 $(MANDIR)/man$(DEXT)/workmandb.$(DEXT)
  79.  
  80. display.o: display.c workman_ui.h
  81. setup.o: setup.c workman_ui.h
  82. workman_stubs.o: workman_stubs.c workman_ui.h
  83. ui_cdinfo.o: ui_cdinfo.c workman_ui.h
  84. # This next one isn't completely true, but close enough
  85. $(OBJECTS): struct.h
  86.  
  87. $(PROGRAM).doc: $(PROGRAM).man
  88.     nroff -man $(PROGRAM).man > $(PROGRAM).doc
  89. workmandb.doc: workmandb.man
  90.     nroff -man workmandb.man > workmandb.doc
  91.  
  92. #
  93. # These targets are for building the shar distribution.
  94. #
  95. shar: part01
  96.  
  97. ALLFILES= README README.ultrix README.hpux ANSWERS INSTALLATION to-do \
  98.     $(PROGRAM)_ui.h \
  99.     $(PROGRAM).man $(PROGRAM).doc $(SOURCES.c) workmandb.man workmandb.doc \
  100.     CHANGELOG struct.h bitmaps bitmaps/loud.icon bitmaps/loud0.icon \
  101.     bitmaps/loud1.icon bitmaps/loud2.icon bitmaps/loud3.icon \
  102.     bitmaps/loud4.icon bitmaps/loud5.icon bitmaps/loud6.icon \
  103.     bitmaps/phones bitmaps/phones0 bitmaps/phonesl1 bitmaps/phonesl2 \
  104.     bitmaps/phonesl3 bitmaps/phonesr1 bitmaps/phonesr2 bitmaps/phonesr3 \
  105.     bitmaps/sink0 bitmaps/sink1 bitmaps/sink2 bitmaps/sink3 \
  106.     bitmaps/sink4 bitmaps/sink5 bitmaps/sink6 bitmaps/sink7 \
  107.     bitmaps/eject.button bitmaps/ff.button \
  108.     bitmaps/icon bitmaps/iconmask bitmaps/pause.button \
  109.     bitmaps/play.button bitmaps/rew.button bitmaps/stop.button \
  110.     $(PROGRAM).info Makefile Makefile.hpux Imakefile WorkMan.tmpl
  111.  
  112. part01: $(ALLFILES)
  113.     makekit -s 60k -n part $(ALLFILES)
  114.  
  115. #
  116. # The following builds a compressed tarfile for binary distribution.
  117. # It will require a little hacking to use on machines other than mine.
  118. #
  119. AUXDIR = /tmp
  120.  
  121. AUXSTUFF = $(AUXDIR)/$(PROGRAM) $(AUXDIR)/ANSWERS \
  122.     $(AUXDIR)/$(PROGRAM).info $(AUXDIR)/CHANGELOG $(AUXDIR)/$(PROGRAM).doc \
  123.     $(AUXDIR)/$(PROGRAM).man $(AUXDIR)/workmandb.man $(AUXDIR)/workmandb.doc
  124.  
  125. tarfile: $(AUXDIR)/$(PROGRAM).tar.Z
  126.  
  127. $(AUXDIR)/$(PROGRAM).tar.Z: $(AUXSTUFF)
  128.     cd $(AUXDIR); tar cf - $(PROGRAM) \
  129.         $(PROGRAM).info CHANGELOG $(PROGRAM).man $(PROGRAM).doc \
  130.         workmandb.man workmandb.doc ANSWERS | \
  131.         compress > $@
  132.     chmod 644 $@
  133.  
  134. $(AUXDIR)/$(PROGRAM): $(PROGRAM)
  135.     cp $(PROGRAM) $@
  136.     chmod 755 $@
  137. $(AUXDIR)/$(PROGRAM).info: $(PROGRAM).info
  138.     cp $(PROGRAM).info $(AUXDIR)
  139.     chmod 644 $@
  140. $(AUXDIR)/ANSWERS: ANSWERS
  141.     cp ANSWERS $@
  142.     chmod 644 $@
  143. $(AUXDIR)/CHANGELOG: CHANGELOG
  144.     cp CHANGELOG $@
  145.     chmod 644 $@
  146. $(AUXDIR)/workmandb.man: workmandb.man
  147.     cp workmandb.man $@
  148.     chmod 644 $@
  149. $(AUXDIR)/workmandb.doc: workmandb.doc
  150.     cp workmandb.4 $@
  151.     chmod 644 $@
  152. $(AUXDIR)/$(PROGRAM).man: $(PROGRAM).man
  153.     cp $(PROGRAM).man $@
  154.     chmod 644 $@
  155. $(AUXDIR)/$(PROGRAM).doc: $(PROGRAM).doc
  156.     cp $(PROGRAM).1 $@
  157.     chmod 644 $@
  158.